<script>
export default {
  name: 'icon',
  functional: true,
  props: {
    icon: {
      type: String,
      default: ''
    }

  },
  render (h, context) {
    const { icon } = context.props
    const vnodes = []
    if (icon) {
      vnodes.push(<i class={`iconfont icon-${icon}`} ></i>)
    }
    return vnodes
  }
}
</script>
